# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kauth
pkgver=6.7.0
pkgrel=0
pkgdesc="Abstraction to system policy and authentication features"
arch="all"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later"
depends_dev="
	kcoreaddons-dev
	kwindowsystem-dev
	polkit-qt-dev
	qt6-qtbase-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	graphviz
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/kauth.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kauth-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	# KAuthHelperTest hangs
	# KAuthFdTest is broken
	ctest --test-dir build --output-on-failure -E '(KAuthHelper|KAuthFd)Test'
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
7345f50a68a7b5e9e0d95f833328902a6864a2c6c24d816bafa077c85bdbe9594ee932ad85456b36d8f7174d0a50caa2ad000fbe203d498c829db23e5b77e59d  kauth-6.7.0.tar.xz
"
